<template>
    <div class="app">
        <h2>我是App组件</h2>
        <Suspense>
            <template v-slot:default>
                <SuspenseChild></SuspenseChild>
            </template>
            <template v-slot:fallback>
                <h2>加载中...</h2>
            </template>
        </Suspense>
    </div>
</template>

<script lang="ts" setup name="AppSuspense">
import { Suspense } from 'vue'
import SuspenseChild from '@/components/SuspenseChild.vue'
</script>

<style>
.app {
    background-color: #ccc;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
    margin: 20px
}
</style>